Skip to content

ci: route lightweight workflow jobs to ubuntu-slim runners#4409

Merged
jonpspri merged 3 commits intomainfrom
jps-pylint-split
Apr 23, 2026
Merged

ci: route lightweight workflow jobs to ubuntu-slim runners#4409
jonpspri merged 3 commits intomainfrom
jps-pylint-split

Conversation

@jonpspri
Copy link
Copy Markdown
Collaborator

📝 Summary

Move CI jobs that don't need cores or RAM from ubuntu-latest (4 CPU, 16 GB) to ubuntu-slim (1 CPU, 5 GB). The intent is to free up the larger runners for jobs that actually use them (pylint, pytest, cargo, docker buildx, playwright) without slowing the lightweight ones meaningfully.

Workflow changes

  • lint.yml — added a per-tool runner field in the matrix. ruff, vulture, interrogate, radon, and the syntax-check matrix (yamllint/jsonlint/tomllint) now run on ubuntu-slim. pylint stays on ubuntu-latest because it imports the project and fans out with --jobs=0.
  • linting-full.yml — whole job moves to ubuntu-slim. make linting-full runs actionlint, reviewdog, commitlint, helm lint/chart-testing/unittest, gosec, govulncheck — none of which need the larger runner.
  • dependency-review.yml, helm-publish.yml (lint + publish), license-check.yml, vitest.yml, python-package.yml — single-purpose jobs with no compilation or parallel test workload, flipped outright.

Pre-commit fix (separate commit)

The check-ci-workflows hook imported pyyaml but ran under bare python3, which fails when the system Python lacks pyyaml. Switched its entry to uv run --no-project --with pyyaml python3 … so it self-bootstraps without polluting the system Python or rebuilding the project venv.

🏷️ Type of Change

  • Chore (deps, CI, tooling)

📓 Notes

Workflows left on ubuntu-latest deliberately: pytest, pytest-rust, rust.*, docker-multiplatform, docker-scan, docker-release, playwright, alembic-upgrade-validation, sql-sanitizer, wrapper, pre-commit, lint-web. These either compile, run parallel test suites, build container images, or were judged borderline and left for a follow-up after observing slim behavior in practice.

ubuntu-slim is a relatively new GitHub-hosted runner tier; if any of the migrated jobs misbehave under 1 CPU / 5 GB, the fix is a one-line revert per workflow.

The check-ci-workflows hook imports pyyaml but ran under bare `python3`,
which fails on environments where the system Python doesn't have pyyaml
installed. Switch to `uv run --no-project --with pyyaml python3` so the
hook self-bootstraps its dependency without polluting the system Python
or rebuilding the project venv.

Signed-off-by: Jonathan Springer <jps@s390x.com>
Move jobs that don't need cores or RAM from ubuntu-latest (4 CPU, 16 GB)
to ubuntu-slim (1 CPU, 5 GB) to free up the larger runners for jobs that
actually use them.

- lint.yml: ruff, vulture, interrogate, radon, and the syntax-check
  matrix (yamllint/jsonlint/tomllint) move to ubuntu-slim. pylint stays
  on ubuntu-latest since it imports the project and fans out with
  --jobs=0.
- linting-full.yml: actionlint, reviewdog, commitlint, helm
  lint/chart-testing/unittest, gosec, govulncheck — none of these need
  the larger runner.
- dependency-review.yml, helm-publish.yml (lint + publish),
  license-check.yml, vitest.yml, python-package.yml: single-purpose
  jobs with no compilation or parallel test workload.

Signed-off-by: Jonathan Springer <jps@s390x.com>
License-check installs Rust via rustup and compiles cargo-license from
source, which is too heavy for ubuntu-slim (1 CPU, 5 GB).

Signed-off-by: Jonathan Springer <jps@s390x.com>
@jonpspri jonpspri merged commit e8d1ff6 into main Apr 23, 2026
22 checks passed
@jonpspri jonpspri deleted the jps-pylint-split branch April 23, 2026 10:01
gcgoncalves pushed a commit that referenced this pull request Apr 23, 2026
* chore(pre-commit): run check-ci-workflows hook via uv

The check-ci-workflows hook imports pyyaml but ran under bare `python3`,
which fails on environments where the system Python doesn't have pyyaml
installed. Switch to `uv run --no-project --with pyyaml python3` so the
hook self-bootstraps its dependency without polluting the system Python
or rebuilding the project venv.

Signed-off-by: Jonathan Springer <jps@s390x.com>

* ci: route lightweight workflow jobs to ubuntu-slim runners

Move jobs that don't need cores or RAM from ubuntu-latest (4 CPU, 16 GB)
to ubuntu-slim (1 CPU, 5 GB) to free up the larger runners for jobs that
actually use them.

- lint.yml: ruff, vulture, interrogate, radon, and the syntax-check
  matrix (yamllint/jsonlint/tomllint) move to ubuntu-slim. pylint stays
  on ubuntu-latest since it imports the project and fans out with
  --jobs=0.
- linting-full.yml: actionlint, reviewdog, commitlint, helm
  lint/chart-testing/unittest, gosec, govulncheck — none of these need
  the larger runner.
- dependency-review.yml, helm-publish.yml (lint + publish),
  license-check.yml, vitest.yml, python-package.yml: single-purpose
  jobs with no compilation or parallel test workload.

Signed-off-by: Jonathan Springer <jps@s390x.com>

* ci: revert license-check to ubuntu-latest

License-check installs Rust via rustup and compiles cargo-license from
source, which is too heavy for ubuntu-slim (1 CPU, 5 GB).

Signed-off-by: Jonathan Springer <jps@s390x.com>

---------

Signed-off-by: Jonathan Springer <jps@s390x.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant